<!--
 * @Author: TT-hzy
 * @Date: 2023-10-31 18:02:48
 * @LastEditors: TT-hzy
 * @LastEditTime: 2024-07-26 15:35:22
-->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta content="IE=Edge" http-equiv="X-UA-Compatible" />
        <meta name="description" content="A new Flutter project." />

        <!-- iOS meta tags & icons -->
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="theme-color" content="#fff" />
        <meta
            name="apple-mobile-web-app-title"
            content="hzy_porject_template"
        />
        <link rel="apple-touch-icon" href="icons/Icon-192.png" />

        <!-- Favicon -->
        <link rel="icon" type="image/png" href="favicon.png" />

        <title>hzy_porject_template</title>
        <link rel="manifest" href="manifest.json" />

        <script>
            // The value below is injected by flutter build, do not touch.
            const serviceWorkerVersion = null
        </script>
        <!-- This script adds the flutter initialization JS code -->
        <script src="flutter.js" defer></script>
    </head>

    <body>
        <script>
            window.addEventListener('load', function (ev) {
                // Download main.dart.js
                _flutter.loader.loadEntrypoint({
                    serviceWorker: {
                        serviceWorkerVersion: serviceWorkerVersion,
                    },
                    onEntrypointLoaded: function (engineInitializer) {
                        engineInitializer
                            .initializeEngine()
                            .then(function (appRunner) {
                                appRunner.runApp()
                            })
                            .then(function () {
                                boundaryCheck()
                            })
                    },
                })
                function boundaryCheck() {
                    const flutterRoot = document
                        .getElementsByTagName('flt-glass-pane')
                        .item(0)
                    flutterRoot.addEventListener('touchstart', (e) => {
                        var pageX = e.targetTouches[0].pageX
                        if (pageX > 24 && pageX < window.innerWidth - 24) return
                        e.preventDefault()
                    })
                }
            })
        </script>
    </body>
</html>
